<?php
/* -------------------------------------------------------------------------------------
* 	fork by itDOT Media - dirk mueller
* 	http://www.itdotmedia.de
*
* --------------------------------------------------------------------------------------
* 	based on:
* 	(c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
* 	(c) 2002-2003 osCommerce - www.oscommerce.com
* 	(c) 2003     nextcommerce - www.nextcommerce.org
* 	(c) 2005     xt:Commerce - www.xt-commerce.com
* 	(c) 2011     SEO:mercari - www.seo-mercari.de
*
* 	Released under the GNU General Public License
* ----------------------------------------------------------------------------------- */

function getImagePaths($path, $preafix) {
  $image_paths = array();
  $folder_items = scandir($path);
  foreach($folder_items as $k => $v) {
    if(@is_dir($path.$v)) {
      if ($v != '.' && $v != '..') {
        if (!defined($preafix.'_'.strtoupper($v)))
          define($preafix.'_'.strtoupper($v), $path.$v.DIRECTORY_SEPARATOR);
        $image_paths[] = $v;
      }
    }
  }
  return $image_paths;
}
?>